package com.techsoul.common.core.pojo.entity;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * Tree基类
 *
 * @author liuen
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
public class TreeEntity extends DataEntity {

    /**
     * PID，父级编号
     */
    private String pid;

    /**
     * 祖级ID集合（多个用逗号隔开）
     */
    private String ancestorIds;

    /**
     * 祖级名称集合（多个用逗号隔开）
     */
    private String ancestorNames;

    /**
     * 层次级别，根为0
     */
    private Integer treeLevel;

    /**
     * 是否为叶子节点（数据字典sys_yn_type，默认1-是）
     */
    private String isLeaf;

    /**
     * 排序
     */
    private Integer treeSort;

    public void setAncestor(String ancestorIds, String ancestorNames) {
        this.ancestorIds = ancestorIds;
        this.ancestorNames = ancestorNames;
    }

}
